package com.hzdl.cinema.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

public class Schedule {
    private Integer scheduleId;

    private Integer playId;

    private Integer studioId;

    private Date startTime;



    private BigDecimal schedulePrice;

    private Play play;

    private Studio studio;

    public Integer getScheduleId() {
        return scheduleId;
    }

    public void setScheduleId(Integer scheduleId) {
        this.scheduleId = scheduleId;
    }

    public Play getPlay() {
        return play;
    }

    public void setPlay(Play play) {
        this.play = play;
    }

    public Schedule() {
    }

    public Schedule(Integer scheduleId, Integer playId, Integer studioId, Date startTime, BigDecimal schedulePrice, Play play, Studio studio) {
        this.scheduleId = scheduleId;
        this.playId = playId;
        this.studioId = studioId;
        this.startTime = startTime;

        this.schedulePrice = schedulePrice;
        this.play = play;
        this.studio = studio;
    }

    public Schedule(Integer scheduleId, Integer playId, Integer studioId, Date startTime, BigDecimal schedulePrice) {
        this.scheduleId = scheduleId;
        this.playId = playId;
        this.studioId = studioId;
        this.startTime = startTime;
        this.schedulePrice = schedulePrice;
    }

    @Override
    public String toString() {
        return "Schedule{" +
                "scheduleId=" + scheduleId +
                ", playId=" + playId +
                ", studioId=" + studioId +
                ", startTime=" + startTime +
                ", schedulePrice=" + schedulePrice +
                ", play=" + play +
                ", studio=" + studio +
                '}';
    }

    public Studio getStudio() {
        return studio;
    }

    public void setStudio(Studio studio) {
        this.studio = studio;
    }

    public Integer getPlayId() {
        return playId;
    }

    public void setPlayId(Integer playId) {
        this.playId = playId;
    }

    public Integer getStudioId() {
        return studioId;
    }

    public void setStudioId(Integer studioId) {
        this.studioId = studioId;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getStartTime() {
        return startTime;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }


    public BigDecimal getSchedulePrice() {
        return schedulePrice;
    }

    public void setSchedulePrice(BigDecimal schedulePrice) {
        this.schedulePrice = schedulePrice;
    }
}